package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabCriticalReport;
import com.ysd.lis.entity.lab.LabDeliveryReceipt;
import com.ysd.lis.entity.lab.LabUnqualifiedGroup;
import com.ysd.lis.service.lab.LabDeliveryReceiptService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 标本交接单主表 前端控制器
 * </p>
 *
 * @author bai
 * @since 2024-02-24
 */
@RestController
@RequestMapping("/lab/delivery/receipt")
public class LabDeliveryReceiptController extends BaseController {
    @Autowired
    LabDeliveryReceiptService deliveryReceiptService;

    @ApiOperation("生成交接单")
    @PostMapping("/creatReceipt")
    public Result creatReceipt(@RequestBody LabDeliveryReceipt labDeliveryReceipt){
        return  deliveryReceiptService.creatReceipt(labDeliveryReceipt);
    }

    @ApiOperation("获取交接单列表（不分页)")
    @GetMapping("/getLabDeliveryReceiptlist")
    public Result getLabDeliveryReceiptlist(LabDeliveryReceipt labDeliveryReceipt) {
        return deliveryReceiptService.getLabDeliveryReceiptlist(labDeliveryReceipt);
    }


    @ApiOperation("根据批次号获取标本信息（不分页)")
    @GetMapping("/getRptMainlistByBatchNo")
    public Result getRptMainlistByBatchNo(LabDeliveryReceipt labDeliveryReceipt) {
        return deliveryReceiptService.getRptMainlistByBatchNo(labDeliveryReceipt);
    }






}
